package com.heima.comment.pojos;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;

@Data
@Document(collection = "ap_comment")
public class ApComment {
    @Id
    private String id;

    @ApiModelProperty(value = "评论id")
    private String commentId;
    private Integer authorId;
    private String authorName;

    @JsonSerialize(using = ToStringSerializer.class)
    private Long entryId;//文章id

    private String channelId;
    @ApiModelProperty(value = "评论层级")
    private Integer type;
    private String content;
    private String image;
    private Integer likes;
    private Integer reply;
    private Integer flag;
    private String longitude;
    private String latitude;
    private String address;
    private String ord;
    private Date createdTime;
    private Date updatedTime;

    //当前登录用户是否点赞了评论，0为已点赞，null为没有
    private Integer operation;
    
    
}
